#!/usr/bin/env python3
# DATA: 2024/10/19
# author: 曹文耀
#


import datetime
import uuid

from sqlalchemy import Column, String, TIMESTAMP, Text

from src.common.dbase.database import Base


class TopicInfo(Base):
    __tablename__ = "tb_topic_info"

    _id = Column(String(32), primary_key=True, default=uuid.uuid1().hex)
    title = Column(String(128), nullable=False, comment="标题")
    tags = Column(String(128), comment="标签")
    body = Column(Text, comment="内容文本")
    cutwd = Column(Text, comment="分词关键字")
    picurl = Column(String(256), comment="图片地址")
    msg = Column(Text, comment="标题+内容文本")
    addtime = Column(TIMESTAMP, default=datetime.datetime.now(), comment="添加时间")
    uptime = Column(TIMESTAMP, default=datetime.datetime.now(), comment="修改时间")
